1. Field of the Invention
The present invention relates to a control system using software components executed on a Java Virtual Machine (JVM) platform. More particularly, this invention relates to an object-software-based control system which includes one or more additional interfaces that provide the system with more versatility and flexibility.
2. Description of the Related Art
Component based programs comprise reusable software components written in an object-oriented programming language that run under an operating system. A wide range of application programs and systems have been written using such components. Programs written in Java® (called Java applications or applets) only require a JVM in order to run, and can be used under any operating system providing JVM support regardless of the type or version of the operating system. A Java application is therefore operating system independent and will run on a system using the Microsoft Windows® operating system, on a system using the Linux operating system, and on systems that have their operating systems implemented as microcode in a dedicated computer chip. Java applications therefore enable an enterprise to protect its software resources because the applications do not depend on a particular operating system. More specifically, developers do not need to develop a Java application for a particular operating system; development therefore costs less than developing multiple versions of the same application for multiple operating systems. The user is also not tied to a particular operating system, and is therefore free to choose from a wider range of operating systems. Developers and users can also continue to use existing software resources even when the operating system is changed or updated.
A point-of-sale (POS) system is exemplary of a system built from a variety of hardware components, typically including a host computer, such as a personal computer, to which a display, printer, scanner, cash drawer, card reader, and other input/output devices are connected. A Java application that does not depend upon the host computer's specifications enables a user to deploy a new POS system using existing hardware and to upgrade or expand the hardware without losing compatibility with the POS application. Application development costs can also be reduced, thereby further reducing the burden on the user. There is also greater flexibility in selecting the hardware. More options are therefore available to the user; a POS system matching the actual user environment can therefore be built more easily. A POS system written as a Java application therefore offers numerous advantages for the user.
The concept of a Java POS system is described below with reference to FIG. 1. This POS system 10 has a POS application program (application) 11 provided by the POS system manufacturer; device control objects 12 (first object or device control) supplied for each type of peripheral device (i.e., device class) such as a printer 21, scanner 22, or cash drawer 23; and device service objects 13 (second object or device service) provided for each particular peripheral device. The peripheral devices 21 to 23 controlled by the respective device services 13 are connected through respective port drivers 14 that control the input/output ports, which may be serial, parallel, or USB, for example, to a personal computer 18 or other host on which the application 11 and other object programs run. In order for the application 11 to print using the printer 21, for example, the application 11 first passes data to the printer control object 12, which passes the data to the device service 13 for the manufacturer and model of printer selected for output. The device service 13 then supplies the data to the printer 21 through port driver 14.
The object control system 19 comprising device controls 12 and device services 13 in the Java POS system 10 shown in FIG. 1 provides the application 11 with an interface that does not depend upon the particular peripheral devices (such as the printer 21) in the system. The application 11, device controls 12, and device services 13 are software programs written in the Java programming language and converted to Java byte code by a compiler so that they will run on a JVM. The JVM converts the Java byte code to code specific to the operating system installed on the host 18 and runs the converted code. The application 11, device controls 12, and device services 13 therefore provide uniform services independent of the operating system.
FIG. 2 shows that part of the object control system 19 that controls a particular device, specifically the printer 21 in this example. The device control 12 provides the application 11 with an interface 12i (first interface) to a printer (device class). Similarly, the device service 13 provides the device control 12 with an interface 13i (second interface) to a specific printer 21 (device). An instance of the device service 13 is created when the device control 12 calls the device service 13 to access a specific printer 21, and this instance is used as the device service 13.
The object control system 19 therefore has a JCL Opos config/loader) object 31 (third object) and a factory class object 34 (fourth object, sometimes called “FC” below). The JCL object 31 is called by the device control 12 to address a specific printer by name and connect to or disconnect from the printer. The FC 34 creates an instance of the device service 13 as instructed by the JCL object 31.
The object control system 19 also maintains a database 33 written in XML (eXtensible Markup Language), for example, of conditions, settings, and other information used by the FC 34 to create an instance of the device service 13, and a name resolution object 32 such as an XML parser for getting a name (logical device name) information entry point to the database 33. The JCL object 31 therefore has an interface 31i (third interface) used by the device control 12 to specify the printer name, and the FC 34 has an interface 34i (fourth interface) enabling the JCL object 31 to specify an entry point.
An XML database manages data in “entry” units, and all information relating to a specific device is stored to the same entry. An entry point is the address for a particular entry. An XML parser is a software structure for interpreting a database written in XML.
An object control system 19 as described above thus distributes various functions to a variety of objects to provide a uniform interface to the application 11, and requires a minimal number of software components to use a variety of devices. For example, the manufacturer of the device (printer) 21 provides a device service 13 for the particular device 21 and a FC 34 for generating an instance of that device service 13, and the user then simply installs these software components on the host 18 in order to make the desired device 21 available to the POS system.